Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Spooling Messages


GXSpoolPage

QuickDraw GX sends the GXSpoolPage message when a page is ready to be sent to the spool file. You can override the GXSpoolPage message to change or add to a page being sent to a spool file. Your override of the GXSpoolPage message must match the following formal declaration:

OSErr MySpoolPage (gxSpoolFile aSpoolFile, gxFormat aFormat, 
                  gxShape aShape);
aSpoolFile
The file to which the page is being written.
aFormat
The format that goes with the page.
aShape
The data that belongs on the page in the form of a picture shape.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the GXSpoolPage message when an application calls either the GXFinishPage function or the GXPrintPage function. This message takes a picture shape in the aShape parameter that represents a page and writes it to the spool file referenced by the aSpoolFile parameter.

You override this message when you need to perform any per-page operations such as adding data (for example, a background picture or confidential stamp) to each page. You need to change the page before forwarding this message because the page is written to the file before control returns from the forwarded message.

The default implementation of GXSpoolPage writes the data into the spool file in a standard format.

SPECIAL CONSIDERATIONS
You rarely send the GXSpoolPage message yourself.

If you are providing your own spooling, you need to totally override GXSpoolPage and all of the other spooling and despooling messages.

If you are not providing your own spooling, you must forward this message to allow the default implementation to write the data into the spool file.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found,
or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
The GXFinishPage and GXPrintPage functions are described in Inside Macintosh: QuickDraw GX Printing.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help